//导入http文件中的request
import request from "./http"
//获取用户主页
export function getUser(userid:number){
    return request({
        url:"user/"+userid,
        method: "get",
    })
}
//用户的作品
//user/:userId/articles
//https://apis.netstart.cn/xpc/user/10121307/articles?type=public&order=view&is_hide_in_space=0&return_struct_type=user_home&page=1
export function getUserJob(userid:number,params:any){
    return request({
        url:"user/"+userid+"/articles?type=public",
        method: "get",
        params
    })
}
//用户的专辑user/:userId/collections
//https://apis.netstart.cn/xpc/user/10020974/collections?page=1
export function getUserAlbum(userid:number,params:any){
    return request({
        url:"user/"+userid+"/collections",
        method: "get",
        params
    })
}
//用户喜欢user/:userId/articles-approved
//https://apis.netstart.cn/xpc/user/10121307/articles-approved?lastIndexId=10985709&limit=20
export function getUserLike(userid:number,params:any){
    return request({
        url:"user/"+userid+"/articles-approved",
        method: "get",
        params
    })
}